-
Notifications
You must be signed in to change notification settings - Fork 668
docs: improve document for setChecked(), setSelected() and setValue() #728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/api/wrapper/setChecked.md
Outdated
|
||
Sets the value of a radio or checkbox `<input>`. | ||
Sets the value to an input element of type checkbox or an input element of type radio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change this to mention the v-model:
Sets checked value for input element of type checkbox or radio and updates
v-model bound data.
docs/api/wrapper/setChecked.md
Outdated
Sets the value of a radio or checkbox `<input>`. | ||
Sets the value to an input element of type checkbox or an input element of type radio. | ||
|
||
When you try to set the value to state via `v-model` by `radioInput.element.checked = true; radioInput.trigger('input')`, `v-model` is not triggered. `v-model` is triggered by `change` event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add this to a notes
sections after the arguments and example, I don't think most users need this info
docs/api/wrapper/setSelected.md
Outdated
|
||
- **Arguments:** | ||
- `{Boolean} selected` | ||
When you try to set the value to state via `v-model` by `option.element.selected = true; parentSelect.trigger('input')`, `v-model` is not triggered. `v-model` is triggered by `change` event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also move this to a - **Notes:**
section
docs/api/wrapper/setValue.md
Outdated
Sets the value of a text `<input>`. | ||
Sets the value to an input element of type text. | ||
|
||
`textInput.setValue(value)` is an alias of the following code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also move this to notes
docs/api/wrapper/setValue.md
Outdated
@@ -1,6 +1,13 @@ | |||
## setValue(value) | |||
|
|||
Sets the value of a text `<input>`. | |||
Sets the value to an input element of type text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sets the value to an input element of type text.
Sets value of a text-control input element and updates
v-model bound data
docs/api/wrapper/setSelected.md
Outdated
|
||
Sets a specified `<option>` as selected in a `<select>`. | ||
Selects a option element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selects a option element.
Selects a option element and updates v-model bound data.
Thank you for pointing out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job! Just one small comment, a -> an.
docs/api/wrapper/setSelected.md
Outdated
|
||
- **Arguments:** | ||
- `{Boolean} selected` | ||
Selects a option element and updates `v-model` bound data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selects an option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This is related to #700 and #729.